package cn.stylefeng.guns.modular.basic.mapper;

import cn.stylefeng.guns.modular.basic.entity.BasicTray;
import cn.stylefeng.guns.modular.basic.model.params.BasicTrayParam;
import cn.stylefeng.guns.modular.basic.model.result.BasicTrayResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 托盘表 Mapper 接口
 * </p>
 *
 * @author hu
 * @since 2019-06-28
 */
public interface BasicTrayMapper extends BaseMapper<BasicTray> {

    /**
     * 获取列表
     *
     * @author hu
     * @Date 2019-06-28
     */
    List<BasicTrayResult> customList(@Param("paramCondition") BasicTrayParam paramCondition);

    /**
     * 获取map列表
     *
     * @author hu
     * @Date 2019-06-28
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") BasicTrayParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author hu
     * @Date 2019-06-28
     */
    Page<BasicTrayResult> customPageList(@Param("page") Page page, @Param("paramCondition") BasicTrayParam paramCondition, @Param("condition") String condition, @Param("operateId") Long operateId);

    /**
     * 获取分页map列表
     *
     * @author hu
     * @Date 2019-06-28
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") BasicTrayParam paramCondition);

	BasicTray findByThelastone();

	List<BasicTrayResult> findListBySpec(@Param("paramCondition") BasicTrayParam paramCondition);

	BasicTrayResult findBySpec(@Param("paramCondition") BasicTrayParam paramCondition,@Param("operateId")Long operateId);

	boolean saveBatchList(@Param("list")List<BasicTray> list);

	boolean batchupdate(@Param("tList")List<BasicTrayParam> tList);

	Integer addReturnId(@Param("paramCondition")BasicTrayParam param);

	void deleteBySpec(@Param("paramCondition")BasicTrayParam param);

}
